home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-10-21 | 2.6 KB | 70 lines |
- package com.symantec.itools.swing.borders;
-
- import java.beans.*;
- import com.symantec.itools.vcafe.beans.*;
-
- public final class BevelBorderBeanInfo
- extends BorderBeanInfo
- {
- public BevelBorderBeanInfo()
- {
- super();
-
- set16x16ColorIconName("BevelBorder.gif");
- }
-
- public PropertyDescriptor[] getPropertyDescriptors()
- {
- try
- {
- Class beanClass = getBeanClass();
-
- PropertyDescriptor bevelTypePD = new PropertyDescriptor("bevelType", beanClass);
- bevelTypePD.setPropertyEditorClass(BevelTypePropertyEditor.class);
- bevelTypePD.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.BEVELBORDER_BEVEL_TYPE_HELP_ID));
-
- PropertyDescriptor highlightOuterColor = new PropertyDescriptor("highlightOuterColor", beanClass);
- highlightOuterColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.BEVELBORDER_HIGHLIGHT_OUTER_COLOR_HELP_ID));
-
- PropertyDescriptor highlightInnerColor = new PropertyDescriptor("highlightInnerColor", beanClass);
- highlightInnerColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.BEVELBORDER_HIGHLIGHT_INNER_COLOR_HELP_ID));
-
- PropertyDescriptor shadowInnerColor = new PropertyDescriptor("shadowInnerColor", beanClass);
- shadowInnerColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.BEVELBORDER_SHADOW_INNER_COLOR_HELP_ID));
-
- PropertyDescriptor shadowOuterColor = new PropertyDescriptor("shadowOuterColor", beanClass);
- shadowOuterColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.BEVELBORDER_SHADOW_OUTER_COLOR_HELP_ID));
-
- PropertyDescriptor[] rv = {
- bevelTypePD,
- highlightOuterColor,
- highlightInnerColor,
- shadowInnerColor,
- shadowOuterColor };
-
- return rv;
- }
- catch(IntrospectionException e)
- {
- e.printStackTrace();
- }
-
- //Error, return no properties
- return new PropertyDescriptor[0];
- }
-
- protected Class getBeanClass()
- {
- return BevelBorder.class;
- }
-
- protected void modifyBeanDescriptor(BeanDescriptor beanDescriptor)
- {
- super.modifyBeanDescriptor(beanDescriptor);
-
- beanDescriptor.setValue("WINHELP", winHelpID);
- }
-
- protected final static String winHelpID = "0x60137";
- }
-